var models = require('../models');
var Cheatsheet = models.Cheatsheet;

exports.removeCheatsheetById = function(user, csid, callback){
  user.cheatsheets = user.cheatsheets.filter(function(a){return a != csid})
  user.save(function(err){
    if(!err){
      Cheatsheet.findOne({_id:csid}).remove(callback)
    }
  })
}
